package work20241207_chap8.l;

/**
 * @author zdl
 * @date 2024/12/7
 */
public class Demo {


    public static void main(String[] args) {
        //创建武器


        //创建soldier
        Soldier soldier = new Soldier();
        soldier.setAge(19);
        soldier.setName("张三");
        soldier.setHurt(20);
        Weapon pike  = new Pike();
        pike.setSoldier(soldier);
        int a =  pike.fire();
        System.out.println(a);
    }
}
